(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

prime(0) → false
prime(s(0)) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0) → false
prime1(x, s(0)) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → =(rem(x, y), 0)

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

prime(0) → false
prime(s(0)) → false
prime(s(s(z0))) → prime1(s(s(z0)), s(z0))
prime1(z0, 0) → false
prime1(z0, s(0)) → true
prime1(z0, s(s(z1))) → and(not(divp(s(s(z1)), z0)), prime1(z0, s(z1)))
divp(z0, z1) → =(rem(z0, z1), 0)
Tuples:

PRIME(s(s(z0))) → c2(PRIME1(s(s(z0)), s(z0)))
PRIME1(z0, s(s(z1))) → c5(DIVP(s(s(z1)), z0), PRIME1(z0, s(z1)))
S tuples:

PRIME(s(s(z0))) → c2(PRIME1(s(s(z0)), s(z0)))
PRIME1(z0, s(s(z1))) → c5(DIVP(s(s(z1)), z0), PRIME1(z0, s(z1)))
K tuples:none
Defined Rule Symbols:

prime, prime1, divp

Defined Pair Symbols:

PRIME, PRIME1

Compound Symbols:

c2, c5

(3) CdtGraphRemoveDanglingProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 of 2 dangling nodes:

PRIME(s(s(z0))) → c2(PRIME1(s(s(z0)), s(z0)))

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

prime(0) → false
prime(s(0)) → false
prime(s(s(z0))) → prime1(s(s(z0)), s(z0))
prime1(z0, 0) → false
prime1(z0, s(0)) → true
prime1(z0, s(s(z1))) → and(not(divp(s(s(z1)), z0)), prime1(z0, s(z1)))
divp(z0, z1) → =(rem(z0, z1), 0)
Tuples:

PRIME1(z0, s(s(z1))) → c5(DIVP(s(s(z1)), z0), PRIME1(z0, s(z1)))
S tuples:

PRIME1(z0, s(s(z1))) → c5(DIVP(s(s(z1)), z0), PRIME1(z0, s(z1)))
K tuples:none
Defined Rule Symbols:

prime, prime1, divp

Defined Pair Symbols:

PRIME1

Compound Symbols:

c5

(5) CdtGraphRemoveTrailingProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

prime(0) → false
prime(s(0)) → false
prime(s(s(z0))) → prime1(s(s(z0)), s(z0))
prime1(z0, 0) → false
prime1(z0, s(0)) → true
prime1(z0, s(s(z1))) → and(not(divp(s(s(z1)), z0)), prime1(z0, s(z1)))
divp(z0, z1) → =(rem(z0, z1), 0)
Tuples:

PRIME1(z0, s(s(z1))) → c5(PRIME1(z0, s(z1)))
S tuples:

PRIME1(z0, s(s(z1))) → c5(PRIME1(z0, s(z1)))
K tuples:none
Defined Rule Symbols:

prime, prime1, divp

Defined Pair Symbols:

PRIME1

Compound Symbols:

c5

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

PRIME1(z0, s(s(z1))) → c5(PRIME1(z0, s(z1)))
We considered the (Usable) Rules:none
And the Tuples:

PRIME1(z0, s(s(z1))) → c5(PRIME1(z0, s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(PRIME1(x1, x2)) = x2   
POL(c5(x1)) = x1   
POL(s(x1)) = [1] + x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

prime(0) → false
prime(s(0)) → false
prime(s(s(z0))) → prime1(s(s(z0)), s(z0))
prime1(z0, 0) → false
prime1(z0, s(0)) → true
prime1(z0, s(s(z1))) → and(not(divp(s(s(z1)), z0)), prime1(z0, s(z1)))
divp(z0, z1) → =(rem(z0, z1), 0)
Tuples:

PRIME1(z0, s(s(z1))) → c5(PRIME1(z0, s(z1)))
S tuples:none
K tuples:

PRIME1(z0, s(s(z1))) → c5(PRIME1(z0, s(z1)))
Defined Rule Symbols:

prime, prime1, divp

Defined Pair Symbols:

PRIME1

Compound Symbols:

c5

(9) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(10) BOUNDS(O(1), O(1))